const path = require('path');
function resolve(dir) {
  return path.join(__dirname, dir)
}
module.exports = {
  publicPath: process.env.NODE_ENV === 'production'
    ? '/'
    : '/',
  devServer: {
    port: 8888,     // 端口
    disableHostCheck: true
  },
  pluginOptions: {
    'style-resources-loader': {
      preProcessor: 'less',
      //这里是你的定义的全局less 变量
      patterns: [
        resolve('src/assets/root.less'),
      ]
    }
  },
  configureWebpack: {
    externals: {
      'vue': 'Vue',
      'vuex': 'Vuex',
      'axios': 'axios',
      'vue-router': 'VueRouter'
    }
  },

  lintOnSave: false   // 取消 eslint 验证
};
